home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 11 / PCPP11.iso / utils / frogbit / fb-097.exe / CHOP AND TOTAL.FB < prev    next >
Encoding:
Text File  |  1997-02-04  |  559 b   |  26 lines

  1.  
  2. // remove sections looking like this :-
  3.  
  4. //  Summary ...
  5. //  ...
  6. //  Total ...
  7.  
  8. // - but also extract info from Total lines
  9.  
  10. input "report.txt"
  11.  
  12. do
  13.   copy lines until (line beginsWith "Summary")
  14.   skip lines until (line beginsWith "Total")
  15.   leave if (not found)
  16.   if (line matches "Total for ~(town), ~(month) ~(year): ~(total)")
  17.     write ("--> " town ": " total " (" month " " year ")")
  18.   else
  19.     write ("*** unrecognised total line: " line)
  20.   endif
  21.  
  22.   // comment out the next line to make the program run faster
  23.   refresh
  24.  
  25. loop
  26.